<template>
	<view class="">
		<view class="c_coundetails">
			<view class="">
				<view class="" style="font-size: 20px;">
					{{info.coupon.couponname}}
				</view>
				<view class="">
					到期时间: {{info.coupon.timestr}}
				</view>
			</view>
			<view class="" style="text-align: right;">
				<view class="">
					消费满 ￥{{info.coupon.enough}}
				</view>
				<view class="" style="font-size: 20px;">
					{{info.coupon.backstr}} ￥{{info.coupon.deduct}}
				</view>
			</view>
		</view>
		<view class="c_counpinfo">
			<view class="">
				使用说明
			</view>
			<view class="">
				共{{info.num}}张
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id: "",
				info: ""
			}
		},
		onLoad(option) {
			var that = this;
			that.id = option.id
			that.$axios('Mydetail/main', "POST", 'coupon', {
				id: that.id
			}).then(res => {
				if (res.data.code == 200) {
					that.info = res.data.data
				}
			}, (error) => {

			})
		},
		methods: {

		}
	}
</script>

<style lang="scss">
	page {
		background: #eee;
		padding: 20upx;
		box-sizing: border-box;
	}

	.c_coundetails {
		padding: 20upx;
		box-sizing: border-box;
		background: #fe7e00;
		color: #fff;
	}

	.c_counpinfo {
		margin-top: 20upx;
		background: #fff;
		padding: 20upx;
		box-sizing: border-box;
		display: flex;
		align-items: center;
		justify-content: space-between;
	}
</style>
